package mcsm.OperationCenter;

import mcsm.DataBaseIntegration.DataBaseConnect;
import mcsm.DataBaseIntegration.EditStaffOperation;
import mcsm.DataBaseInterface.Connector;
import mcsm.Model.Staff;

public class EditStaff {
	DataBaseConnect database=DataBaseConnect.getDatabase();
	Connector connector;

	public Staff editStaff(Staff tempStaff, String name, int privilege,String password,
			String outOfContract, String salary, String shop) {
		tempStaff.setName(name);
		tempStaff.setPrivilege(privilege);
		tempStaff.setPassword(password);
		tempStaff.setOutOfContract(outOfContract);
		tempStaff.setSalary(salary);
		tempStaff.setShop(shop);
		
		
		connector=new EditStaffOperation(tempStaff);
		database.connect(connector);
		return tempStaff;
	}

}
